package com.ji.li.reactadminproexampleservice.entity.http;

public enum ResEnum {
    // 成功
    SUCCESS(0,"操作成功"),
    // 异常
    ERROR(-1,"异常错误"),
    PARAMS_ERROR(4,"入参错误"),

    // 登录相关
    LOGIN_ERROR(2,"账号或密码错误"),
    TYPE_ERROR(3,"type参数错误"),

    // 授权相关
    INVALID_TOKEN(1,"非法token");

    private final int code;
    private final String msg;

    ResEnum(int code, String msg){
        this.code = code;
        this.msg = msg;
    }

    public int getCode(){
        return this.code;
    }

    public String getMsg(){
        return this.msg;
    }
}
